import { WeaLocaleProvider } from 'ecCom';
const getLabel = WeaLocaleProvider.getLabel;

export default {
  required: {
    validate: ({ value }) => !!(value && value.length)
  },
  custom: {
    validate: ({ value }) => {
      const rejectedFile = value.find(({ error }) => !!error);
      
      return !rejectedFile;
    },
    error: () => getLabel('510482','请上传符合要求的文件')
  }
};